/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package uimigration.Interactions.util;

import java.util.List;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;

import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import uimigration.Interactions.*;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see uimigration.Interactions.InteractionsPackage
 * @generated
 */
public class InteractionsSwitch<T> extends Switch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static InteractionsPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public InteractionsSwitch() {
		if (modelPackage == null) {
			modelPackage = InteractionsPackage.eINSTANCE;
		}
	}

	/**
	 * Checks whether this is a switch for the given package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @parameter ePackage the package in question.
	 * @return whether this is a switch for the given package.
	 * @generated
	 */
	@Override
	protected boolean isSwitchFor(EPackage ePackage) {
		return ePackage == modelPackage;
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated NOT
	 */
	protected T doSwitch(EClass theEClass, EObject theEObject) {
		if (theEClass.eContainer() == modelPackage) {
			return doSwitch(theEClass.getClassifierID(), theEObject);
		} else {
			List<?> eSuperTypes = theEClass.getESuperTypes();
			return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(
					(EClass) eSuperTypes.get(0), theEObject);
		}
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	@Override
	protected T doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
			case InteractionsPackage.AINTERACTIONS: {
				AInteractions aInteractions = (AInteractions)theEObject;
				T result = caseAInteractions(aInteractions);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.INPUT: {
				Input input = (Input)theEObject;
				T result = caseInput(input);
				if (result == null) result = caseAInteractions(input);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.OUTPUT: {
				Output output = (Output)theEObject;
				T result = caseOutput(output);
				if (result == null) result = caseAInteractions(output);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.ACTION: {
				Action action = (Action)theEObject;
				T result = caseAction(action);
				if (result == null) result = caseInput(action);
				if (result == null) result = caseAInteractions(action);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.BEHAVIOUR: {
				Behaviour behaviour = (Behaviour)theEObject;
				T result = caseBehaviour(behaviour);
				if (result == null) result = caseInput(behaviour);
				if (result == null) result = caseAInteractions(behaviour);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.ACTIVATE: {
				Activate activate = (Activate)theEObject;
				T result = caseActivate(activate);
				if (result == null) result = caseAction(activate);
				if (result == null) result = caseInput(activate);
				if (result == null) result = caseAInteractions(activate);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.MOVE_DEVICE: {
				MoveDevice moveDevice = (MoveDevice)theEObject;
				T result = caseMoveDevice(moveDevice);
				if (result == null) result = caseAction(moveDevice);
				if (result == null) result = caseInput(moveDevice);
				if (result == null) result = caseAInteractions(moveDevice);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.ENTER_DATA: {
				EnterData enterData = (EnterData)theEObject;
				T result = caseEnterData(enterData);
				if (result == null) result = caseAction(enterData);
				if (result == null) result = caseInput(enterData);
				if (result == null) result = caseAInteractions(enterData);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.WIDGET: {
				Widget widget = (Widget)theEObject;
				T result = caseWidget(widget);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.CONTENT: {
				Content content = (Content)theEObject;
				T result = caseContent(content);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.DATA_TYPE: {
				DataType dataType = (DataType)theEObject;
				T result = caseDataType(dataType);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.PATH: {
				Path path = (Path)theEObject;
				T result = casePath(path);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.SELECT_CONTENT: {
				SelectContent selectContent = (SelectContent)theEObject;
				T result = caseSelectContent(selectContent);
				if (result == null) result = caseBehaviour(selectContent);
				if (result == null) result = caseInput(selectContent);
				if (result == null) result = caseAInteractions(selectContent);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.SELECT_WIDGET: {
				SelectWidget selectWidget = (SelectWidget)theEObject;
				T result = caseSelectWidget(selectWidget);
				if (result == null) result = caseBehaviour(selectWidget);
				if (result == null) result = caseInput(selectWidget);
				if (result == null) result = caseAInteractions(selectWidget);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.ACTIVATE_TASK: {
				ActivateTask activateTask = (ActivateTask)theEObject;
				T result = caseActivateTask(activateTask);
				if (result == null) result = caseBehaviour(activateTask);
				if (result == null) result = caseInput(activateTask);
				if (result == null) result = caseAInteractions(activateTask);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.ACTIVATE_WIDGET: {
				ActivateWidget activateWidget = (ActivateWidget)theEObject;
				T result = caseActivateWidget(activateWidget);
				if (result == null) result = caseBehaviour(activateWidget);
				if (result == null) result = caseInput(activateWidget);
				if (result == null) result = caseAInteractions(activateWidget);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.EDIT_CONTENT: {
				EditContent editContent = (EditContent)theEObject;
				T result = caseEditContent(editContent);
				if (result == null) result = caseBehaviour(editContent);
				if (result == null) result = caseInput(editContent);
				if (result == null) result = caseAInteractions(editContent);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.RESIZE: {
				Resize resize = (Resize)theEObject;
				T result = caseResize(resize);
				if (result == null) result = caseBehaviour(resize);
				if (result == null) result = caseInput(resize);
				if (result == null) result = caseAInteractions(resize);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.ACTIVATE_NAVIGATION: {
				ActivateNavigation activateNavigation = (ActivateNavigation)theEObject;
				T result = caseActivateNavigation(activateNavigation);
				if (result == null) result = caseBehaviour(activateNavigation);
				if (result == null) result = caseInput(activateNavigation);
				if (result == null) result = caseAInteractions(activateNavigation);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.MOVE_WIDGET: {
				MoveWidget moveWidget = (MoveWidget)theEObject;
				T result = caseMoveWidget(moveWidget);
				if (result == null) result = caseBehaviour(moveWidget);
				if (result == null) result = caseInput(moveWidget);
				if (result == null) result = caseAInteractions(moveWidget);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.TRANSLATE: {
				Translate translate = (Translate)theEObject;
				T result = caseTranslate(translate);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.ROTATE: {
				Rotate rotate = (Rotate)theEObject;
				T result = caseRotate(rotate);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.GRAPHICAL_RENDERING: {
				GraphicalRendering graphicalRendering = (GraphicalRendering)theEObject;
				T result = caseGraphicalRendering(graphicalRendering);
				if (result == null) result = caseOutput(graphicalRendering);
				if (result == null) result = caseAInteractions(graphicalRendering);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case InteractionsPackage.DISPLAY_VALUE: {
				DisplayValue displayValue = (DisplayValue)theEObject;
				T result = caseDisplayValue(displayValue);
				if (result == null) result = caseGraphicalRendering(displayValue);
				if (result == null) result = caseOutput(displayValue);
				if (result == null) result = caseAInteractions(displayValue);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>AInteractions</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>AInteractions</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseAInteractions(AInteractions object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Input</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Input</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseInput(Input object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Output</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Output</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseOutput(Output object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Action</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Action</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseAction(Action object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Behaviour</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Behaviour</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseBehaviour(Behaviour object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Activate</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Activate</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseActivate(Activate object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Move Device</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Move Device</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMoveDevice(MoveDevice object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Enter Data</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Enter Data</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseEnterData(EnterData object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Widget</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Widget</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseWidget(Widget object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Content</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Content</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseContent(Content object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Data Type</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Data Type</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseDataType(DataType object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Path</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Path</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T casePath(Path object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Select Content</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Select Content</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseSelectContent(SelectContent object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Select Widget</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Select Widget</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseSelectWidget(SelectWidget object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Activate Task</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Activate Task</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseActivateTask(ActivateTask object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Activate Widget</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Activate Widget</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseActivateWidget(ActivateWidget object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Edit Content</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Edit Content</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseEditContent(EditContent object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Resize</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Resize</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseResize(Resize object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Activate Navigation</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Activate Navigation</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseActivateNavigation(ActivateNavigation object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Move Widget</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Move Widget</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMoveWidget(MoveWidget object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Translate</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Translate</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseTranslate(Translate object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Rotate</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Rotate</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseRotate(Rotate object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Graphical Rendering</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Graphical Rendering</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseGraphicalRendering(GraphicalRendering object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Display Value</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Display Value</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseDisplayValue(DisplayValue object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	@Override
	public T defaultCase(EObject object) {
		return null;
	}

} //InteractionsSwitch
